# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

_pkgname=KiKit
pkgname=python-kikit
pkgver=1.3.0
pkgrel=2
pkgdesc='Automation tools for KiCAD'
arch=('any')
url='https://github.com/yaqwsx/KiKit'
license=('MIT')
depends=('python' 'kicad' 'python-numpy' 'python-shapely' 'python-click' 'python-markdown2'
         'python-pybars3' 'python-solidpython' 'python-pcbnewtransition' 'python-commentjson')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('4c4ce70392c96cb061212c184016cf6282996b3a3128e6bf7c49a68d73b2970249661b01e1d6facf35010e8f66fc072009d79f250bf21235d5abe9d10878040a')

prepare() {
  sed -i '/versioneer/d' $_pkgname-$pkgver/setup.py
}

build() {
  cd $_pkgname-$pkgver

  python -m build -nw
}

package() {
  cd $_pkgname-$pkgver

  python -m installer -d "$pkgdir" dist/*.whl

  install -Dm 644 LICENCE "$pkgdir"/usr/share/licenses/$pkgname/LICENCE
}

# vim:set ts=2 sw=2 et:
